widget: Fix set_focus_child handling during focus changes
authorOlivier Brunel <jjk@jjacky.com>
Tue, 28 Jan 2014 19:33:09 +0000 (20:33 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 4 Feb 2014 02:25:07 +0000 (21:25 -0500)
commita8d72a9c1e7e9b6469a4b858bc3c0231f37aa0f8
treee4506eef92ad2d7bb5f24964c3b2150aeaf98ef6
parent5e80ec87f3aa4d21c26bcd7472d14aea999e96b5
widget: Fix set_focus_child handling during focus changes

10b5ec20 made sure not to set focus_child to NULL all the way up to the
top, but only up to the common ancestor. However, it would never set it
on the common ancestor itself, which would therefore remain with a
focus_child set when it shouldn't.

A manifestation of the bug: focus column headers of a treeview, press Tab.
Now pressing Shift+Tab will go to another widget and not the column
headers, and Tab will (appear to) do nothing, all because the treeview
still has a focus_child set to column headers after a grab_focus().

Signed-off-by: Olivier Brunel <jjk@jjacky.com>
https://bugzilla.gnome.org/show_bug.cgi?id=723402
gtk/gtkwidget.c